#
#	Makefile for oficonv/datasrc
#

@SET_MAKE@

SHELL = /bin/sh
VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
srcdir = @srcdir@
top_srcdir = @top_srcdir@
configdir = @top_srcdir@/@configdir@

include $(configdir)/@common_makefile@


all:

# special make target "oficonv_data_files".
# This compiles the binary oficonv data files from the source files
# in the datasrc directory.

oficonv_data_files:
	../apps/mkcsmapper -o "../data/csmapper/CP/CP936EXT%UCS.mps"                 "csmapper/CP/CP936EXT%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/CP/UCS%CP936EXT.mps"                 "csmapper/CP/UCS%CP936EXT.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB18030%UCS@BMP.mps"              "csmapper/GB/GB18030%UCS@BMP.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB2312%UCS.mps"                   "csmapper/GB/GB2312%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB2312EXT%UCS.mps"                "csmapper/GB/GB2312EXT%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB2312GBK%UCS.mps"                "csmapper/GB/GB2312GBK%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB2312UDA1%UCS.mps"               "csmapper/GB/GB2312UDA1%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GB2312UDA2%UCS.mps"               "csmapper/GB/GB2312UDA2%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GBKEXT%UCS.mps"                   "csmapper/GB/GBKEXT%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/GBKUDA%UCS.mps"                   "csmapper/GB/GBKUDA%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GB2312.mps"                   "csmapper/GB/UCS%GB2312.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GB2312EXT.mps"                "csmapper/GB/UCS%GB2312EXT.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GB2312UDA1.mps"               "csmapper/GB/UCS%GB2312UDA1.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GB2312UDA2.mps"               "csmapper/GB/UCS%GB2312UDA2.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GBKEXT.mps"                   "csmapper/GB/UCS%GBKEXT.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS%GBKUDA.mps"                   "csmapper/GB/UCS%GBKUDA.src"
	../apps/mkcsmapper -o "../data/csmapper/GB/UCS@BMP%GB18030.mps"              "csmapper/GB/UCS@BMP%GB18030.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-2%UCS.mps"         "csmapper/ISO-8859/ISO-8859-2%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-3%UCS.mps"         "csmapper/ISO-8859/ISO-8859-3%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-4%UCS.mps"         "csmapper/ISO-8859/ISO-8859-4%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-5%UCS.mps"         "csmapper/ISO-8859/ISO-8859-5%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-6%UCS.mps"         "csmapper/ISO-8859/ISO-8859-6%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-7%UCS.mps"         "csmapper/ISO-8859/ISO-8859-7%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-8%UCS.mps"         "csmapper/ISO-8859/ISO-8859-8%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-9%UCS.mps"         "csmapper/ISO-8859/ISO-8859-9%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-11%UCS.mps"        "csmapper/ISO-8859/ISO-8859-11%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/ISO-8859-15%UCS.mps"        "csmapper/ISO-8859/ISO-8859-15%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-2.mps"         "csmapper/ISO-8859/UCS%ISO-8859-2.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-3.mps"         "csmapper/ISO-8859/UCS%ISO-8859-3.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-4.mps"         "csmapper/ISO-8859/UCS%ISO-8859-4.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-5.mps"         "csmapper/ISO-8859/UCS%ISO-8859-5.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-6.mps"         "csmapper/ISO-8859/UCS%ISO-8859-6.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-7.mps"         "csmapper/ISO-8859/UCS%ISO-8859-7.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-8.mps"         "csmapper/ISO-8859/UCS%ISO-8859-8.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-9.mps"         "csmapper/ISO-8859/UCS%ISO-8859-9.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-11.mps"        "csmapper/ISO-8859/UCS%ISO-8859-11.src"
	../apps/mkcsmapper -o "../data/csmapper/ISO-8859/UCS%ISO-8859-15.mps"        "csmapper/ISO-8859/UCS%ISO-8859-15.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/JISX0201-KANA%UCS.mps"           "csmapper/JIS/JISX0201-KANA%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/JISX0208@1990%UCS.mps"           "csmapper/JIS/JISX0208@1990%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/JISX0212%UCS.mps"                "csmapper/JIS/JISX0212%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/UCS%JISX0201-KANA.mps"           "csmapper/JIS/UCS%JISX0201-KANA.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/UCS%JISX0208@1990.mps"           "csmapper/JIS/UCS%JISX0208@1990.src"
	../apps/mkcsmapper -o "../data/csmapper/JIS/UCS%JISX0212.mps"                "csmapper/JIS/UCS%JISX0212.src"
	../apps/mkcsmapper -o "../data/csmapper/KS/KSC5601HANGUL%UCS.mps"            "csmapper/KS/KSC5601HANGUL%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/KS/KSC5601HANJA%UCS.mps"             "csmapper/KS/KSC5601HANJA%UCS.src"
	../apps/mkcsmapper -o "../data/csmapper/KS/UCS%KSC5601HANGUL.mps"            "csmapper/KS/UCS%KSC5601HANGUL.src"
	../apps/mkcsmapper -o "../data/csmapper/KS/UCS%KSC5601HANJA.mps"             "csmapper/KS/UCS%KSC5601HANJA.src"
	cp "csmapper/ISO646/ISO646-JP%UCS.646"         "../data/csmapper/ISO646/ISO646-JP%UCS.646"
	cp "csmapper/ISO646/ISO646-US%UCS.646"         "../data/csmapper/ISO646/ISO646-US%UCS.646"
	cp "csmapper/mapper.dir"                       "../data/csmapper/mapper.dir"
	../apps/mkcsmapper -m -o "../data/csmapper/mapper.dir.db"                    "../data/csmapper/mapper.dir"
	../apps/mkcsmapper -p -o "../data/csmapper/charset.pivot.pvdb"               "csmapper/charset.pivot"
	../apps/mkesdb -o "../data/esdb/EUC/EUC-CN.esdb"       "esdb/EUC/EUC-CN.src"
	../apps/mkesdb -o "../data/esdb/EUC/EUC-KR.esdb"       "esdb/EUC/EUC-KR.src"
	../apps/mkesdb -o "../data/esdb/GB/GB18030.esdb"       "esdb/GB/GB18030.src"
	../apps/mkesdb -o "../data/esdb/GB/GBK.esdb"           "esdb/GB/GBK.src"
	sed 's/ISO-8859-x/ISO-8859-1/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-1.src"
	sed 's/ISO-8859-x/ISO-8859-2/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-2.src"
	sed 's/ISO-8859-x/ISO-8859-3/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-3.src"
	sed 's/ISO-8859-x/ISO-8859-4/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-4.src"
	sed 's/ISO-8859-x/ISO-8859-5/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-5.src"
	sed 's/ISO-8859-x/ISO-8859-6/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-6.src"
	sed 's/ISO-8859-x/ISO-8859-7/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-7.src"
	sed 's/ISO-8859-x/ISO-8859-8/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-8.src"
	sed 's/ISO-8859-x/ISO-8859-9/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-9.src"
	sed 's/ISO-8859-x/ISO-8859-11/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-11.src"
	sed 's/ISO-8859-x/ISO-8859-15/' "esdb/ISO-8859/ISO-8859.src" > "ISO-8859-15.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-1.esdb"      "ISO-8859-1.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-2.esdb"      "ISO-8859-2.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-3.esdb"      "ISO-8859-3.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-4.esdb"      "ISO-8859-4.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-5.esdb"      "ISO-8859-5.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-6.esdb"      "ISO-8859-6.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-7.esdb"      "ISO-8859-7.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-8.esdb"      "ISO-8859-8.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-9.esdb"      "ISO-8859-9.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-11.esdb"     "ISO-8859-11.src"
	../apps/mkesdb -o "../data/esdb/ISO-8859/ISO-8859-15.esdb"     "ISO-8859-15.src"
	sed 's/ISO646-x/ISO646-US/' "esdb/ISO646/ISO646.src" > "ISO646-US.src"
	../apps/mkesdb -o "../data/esdb/ISO646/ISO646-US.esdb"          "ISO646-US.src"
	../apps/mkesdb -o "../data/esdb/MISC/JISX0201-KANA.esdb"  "esdb/MISC/JISX0201-KANA.src"
	../apps/mkesdb -o "../data/esdb/MISC/JISX0208@1990.esdb"  "esdb/MISC/JISX0208@1990.src"
	../apps/mkesdb -o "../data/esdb/MISC/Shift_JIS.esdb"      "esdb/MISC/Shift_JIS.src"
	../apps/mkesdb -o "../data/esdb/MISC/JISX0212.esdb"       "esdb/MISC/JISX0212.src"
	sed 's/UTF-mod/UTF1632/' "esdb/UTF/UTF.src"           > "temp01.src"
	sed 's/UTF-mod/UTF8/' "esdb/UTF/UTF.src"              > "temp03.src"
	sed 's/UTF-x/UTF-16-INTERNAL/' "temp01.src"           > "temp04.src"
	sed 's/UTF-x/UTF-16-SWAPPED/' "temp01.src"            > "temp05.src"
	sed 's/UTF-x/UTF-16/' "temp01.src"                    > "temp06.src"
	sed 's/UTF-x/UTF-16BE/' "temp01.src"                  > "temp07.src"
	sed 's/UTF-x/UTF-16LE/' "temp01.src"                  > "temp08.src"
	sed 's/UTF-x/UTF-32-INTERNAL/' "temp01.src"           > "temp09.src"
	sed 's/UTF-x/UTF-32-SWAPPED/' "temp01.src"            > "temp10.src"
	sed 's/UTF-x/UTF-32/' "temp01.src"                    > "temp11.src"
	sed 's/UTF-x/UTF-32BE/' "temp01.src"                  > "temp12.src"
	sed 's/UTF-x/UTF-32LE/' "temp01.src"                  > "temp13.src"
	sed 's/UTF-x/UTF-8/' "temp03.src"                     > "temp15.src"
	sed 's/UTF-var/utf16,internal,force/' "temp04.src"    > "UTF-16-INTERNAL.src"
	sed 's/UTF-var/utf16,swapped,force/' "temp05.src"     > "UTF-16-SWAPPED.src"
	sed 's/UTF-var/utf16/' "temp06.src"                   > "UTF-16.src"
	sed 's/UTF-var/utf16,big,force/' "temp07.src"         > "UTF-16BE.src"
	sed 's/UTF-var/utf16,little,force/' "temp08.src"      > "UTF-16LE.src"
	sed 's/UTF-var/utf32,internal,force/' "temp09.src"    > "UTF-32-INTERNAL.src"
	sed 's/UTF-var/utf32,swapped,force/' "temp10.src"     > "UTF-32-SWAPPED.src"
	sed 's/UTF-var/utf32/' "temp11.src"                   > "UTF-32.src"
	sed 's/UTF-var/utf32,big,force/' "temp12.src"         > "UTF-32BE.src"
	sed 's/UTF-var/utf32,little,force/' "temp13.src"      > "UTF-32LE.src"
	sed 's/UTF-var/utf8/' "temp15.src"                    > "UTF-8.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-16-INTERNAL.esdb"  "UTF-16-INTERNAL.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-16-SWAPPED.esdb"   "UTF-16-SWAPPED.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-16.esdb"           "UTF-16.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-16BE.esdb"         "UTF-16BE.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-16LE.esdb"         "UTF-16LE.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-32-INTERNAL.esdb"  "UTF-32-INTERNAL.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-32-SWAPPED.esdb"   "UTF-32-SWAPPED.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-32.esdb"           "UTF-32.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-32BE.esdb"         "UTF-32BE.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-32LE.esdb"         "UTF-32LE.src"
	../apps/mkesdb -o "../data/esdb/UTF/UTF-8.esdb"            "UTF-8.src"
	../apps/mkesdb -m -o "../data/esdb/esdb.dir.db"            "esdb/esdb.dir"
	../apps/mkesdb -m -o "../data/esdb/esdb.alias.db"          "esdb/esdb.alias"


install:


clean:
	rm ISO-8859-1.src ISO-8859-2.src ISO-8859-3.src ISO-8859-4.src ISO-8859-5.src ISO-8859-6.src ISO-8859-7.src ISO-8859-8.src ISO-8859-9.src ISO-8859-11.src ISO-8859-15.src ISO646-US.src
	rm temp01.src temp03.src temp04.src temp05.src temp06.src temp07.src temp08.src temp09.src temp10.src temp11.src temp12.src temp13.src temp15.src
	rm UTF-16-INTERNAL.src UTF-16-SWAPPED.src UTF-16.src UTF-16BE.src UTF-16LE.src UTF-32-INTERNAL.src UTF-32-SWAPPED.src UTF-32.src UTF-32BE.src UTF-32LE.src UTF-8.src

distclean: clean

dependencies:
